package com.meisupic.copyright.domain.po;


import static javax.persistence.EnumType.STRING;

import com.meisupic.copyright.common.AuthProcessEnum;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.UpdateTimestamp;

@Data
@Entity
@Table(name = "copyright_realname_auth")
@DynamicUpdate
public class RealNameAuth {

  @Id
  @GeneratedValue
  private Long id;

  /**
   * 企业或个人名称.
   */
  @Column(name = "auth_name", length = 200, nullable = false)
  private String authName;

  /**
   * 认证类型
   */
  @Column(name = "auth_type", length = 10, nullable = false)
  private String authType;

  /**
   * 是否为高级合伙人
   */
  @Column(name = "is_senior_partner")
  private boolean seniorPartner;

  /**
   * 证件类型.
   */
  @Column(name = "document_type", length = 1, nullable = false)
  private Integer documentType;

  /**
   * 证件号码.
   */
  @Column(name = "document_no", length = 25, nullable = false)
  private String documetNo;

  /**
   * 证件是否长期有效
   */
  @Column(name = "long_term_effective", length = 1, nullable = false)
  private Integer longTermEffective;

  /**
   * 失效日期
   */
  @Column(name = "invalid_date")
  private Date invalidDate;

  /**
   * 证件照片正面图片地址
   */
  @Column(name = "document_img_positive", nullable = false)
  private String documentImgPositive;

  /**
   * 证件反面照片
   */
  @Column(name = "document_img_back")
  private String documentImgBack;

  /**
   * 手机号码.
   */
  @Column(name = "mobile", length = 15)
  private String mobile;

  /**
   * 邮箱.
   */
  @Column(name = "email", length = 120)
  private String email;

  @Column(name = "province", length = 50)
  private String province;

  @Column(name = "city", length = 50)
  private String city;

  @Column(name = "address", length = 100)
  private String address;

  /**
   * 法人姓名
   */
  @Column(name = "legal_name",length = 50)
  private String legalName;

  /**
   * 法人身份号码.
   */
  @Column(name = "legal_identity_card_no", length = 20)
  private String legalIdentityCardNo;

  /**
   * 法人身份证正面照片.
   */
  @Column(name = "corporate_identity_card_img_positive")
  private String corporateIdentityCardImgPositive;

  /**
   * 法人身份证反面照片.
   */
  @Column(name = "corporate_identity_card_img_back")
  private String corporateIdentityCardImgBack;

  /**
   * E签宝签名认证id
   */
  @Column(name = "account_id",length = 50,columnDefinition = "varchar(50) default ''")
  private String accountId;
  /**
   * 审核状态
   */
  @Column(name = "audit_status", length = 10, nullable = false)
  @Enumerated(value = STRING)
  private AuthProcessEnum auditStatus;

  /**
   *
   */
  @Column(name = "version", length = 3, nullable = false)
  @Version
  private Integer version;

  @Column(name = "creator_id", length = 10, nullable = false)
  private Long creatorId;

  @Column(name = "create_time", nullable = false)
  @CreationTimestamp()
  private Date createTime;

  @Column(name = "modifier_id", length = 10, nullable = false)
  private Long modifierId;

  @Column(name = "modify_time", nullable = false)
  @UpdateTimestamp
  private Date modifyTime;

  @Column(name = "private_key",length = 128)
  private String privateKey;

  @Column(name = "public_key",length = 128)
  private String publicKey;

  @Column(name = "client_id",length = 50)
  private String clientId;
}
